#include <iostream>
#include "vectorfunctions.h"

int main()
{
	int m, n, i;
	int a[100], b[100], sum[100];
	cout<<"Length of array a : ";
	cin>>m;
	readVector(a, m);
	cout<<"Length of array b : ";
	cin>>n;
	readVector(b, n);
	if(n>m){
		for(i=0;i<n;i++){
			if(i<m)
				sum[i]=a[i] + b[i];
			else
				sum[i]=b[i];
		}
	printVector(sum, n);
	}
	else {
		for(i=0;i<m;i++){
			if(i<n)
				sum[i]=a[i] + b[i];
			else
				sum[i]=a[i];
		}
	printVector(sum, m);
	}
return 0;
}
